import numpy
a = numpy.arange(0,100,10,dtype=float)
print(a)

#求正弦余弦值
a_sin = numpy.sin(a)
a_cos = numpy.cos(a)
print(a_sin)
print(a_cos)

print(numpy.ceil(a_sin))#向上取整
print(numpy.round(a_sin))#四舍五入
print(numpy.floor(a_sin))#向下取整

#等差数列
print(numpy.linspace(0,9,10))

#求取绝对值
print(numpy.absolute(numpy.round(a_sin)))

#平方根
print(numpy.sqrt(a))

a.shape = 2,5 #修改a为2行5列
print(a)
a.shape = 1,-1 #修改a为一行
print(a)
b = a.reshape(5,2) #不修改a本身，而是计算返回数列
print(b)

